<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/css/bootstrap.css" />
    <style>
        .page-container{
            padding-top:5px; ;
        }
    </style>
    <title>配置列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="{:url('index/index')}">首页</a>  <span class="c-gray en">&gt;</span> 常规管理 </a><span class="c-gray en">&gt;</span> 配置列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:-2px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="admin_add('添加配置','{:url('conf/add')}','800','500')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加配置</a></span> </div>
    <br>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">配置列表</th>
        </tr>
        <tr class="text-c">
            <th width="25"><input type="checkbox" name="" value=""></th>
            <th width="40">ID</th>
            <th width="150">英文名称</th>
            <th width="90">中文名称</th>
            <th width="130">配置类型</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $data as $value}
        <tr class="text-c">
            <td><input type="checkbox" value="{$value['id']}" name=""></td>
            <td>{$value['id']}</td>
            <td>{$value['enname']}</td>
            <td>{$value['cnname']}</td>
            <td>
                {$value['type']}
            </td>
            <td class="td-manage">
                <a style="text-decoration:none" class="ml-5" onClick="conf_edit('编辑配置',{$value['id']})" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                <a style="text-decoration:none" class="ml-5" onClick="del({$value['id']})" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
        </tr>
        {/foreach}
        </tbody>
    </table>

</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__ADMIN__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__ADMIN__/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="__ADMIN__/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__ADMIN__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="__ADMIN__/js/maowenke.js"></script>
<script type="text/javascript">

    /*管理员-增加*/
    function admin_add(title,url,w,h){
        layer_show(title,url,w,h,function () {
            window.location.reload();
        });
    }
    /*管理员-删除*/
    function del($id) {
        layer.confirm('你确定要删除吗？',{btn:['确定','取消']},function () {
            $.post("{:url('conf/del_conf')}",{id:$id},function (data) {
                if(data.code==200){
                    layer.msg(data.msg);
                    setTimeout(function () {
                        window.location.reload();
                    },1500);
                }else{
                    layer.msg(data.msg);
                }
            })
        });

    }

    /*管理员-编辑*/
    function conf_edit(title,id){
        var url = "{:url('conf/edit_cof')}?id="+id;
        var w   = '400';
        var h   = '400';
        layer_show(title,url,w,h,function () {
            window.location.reload();
        });
    }

</script>
</body>
</html>